﻿using System;
using System.Windows.Forms;
using SharpCommon.Winform;

namespace WinformTest
{
    public partial class Form1 : Form
    {
        NotifyIconWrapper test = new NotifyIconWrapper("market.ico");

        public Form1()
        {
            InitializeComponent();

            //这是显示任务栏的属性
            //不是托盘的属性，CTM，一直搞错了，奶奶的
            //默认是显示在任务栏
            this.ShowInTaskbar = false;

            test.AddMenuItem(new MenuItem("退出"), EventHandler);
        }

        private void EventHandler(object sender, EventArgs eventArgs)
        {
            Application.Exit();
        }
    }
}
